* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "SimSun", "宋体", serif;
	user-select: none;
}

body {
	background: #e8dfca
		url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23d4c8a6"/><path d="M0 0 L100 100 M100 0 L0 100" stroke="%23b8a88d" stroke-width="1"/></svg>');
	color: #4a3c2e;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 10px;
}

.container {
	width: 100%;
	background: #f5f0e1;
	border: 8px double #8a6d3b;
	border-radius: 5px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	padding: 5px;
	position: relative;
	overflow: hidden;
}

.container::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><rect width="200" height="200" fill="none" stroke="%238a6d3b" stroke-width="0.5" stroke-dasharray="5,5"/></svg>');
	opacity: 0.2;
	pointer-events: none;
}

.section {
	display: none;
	min-height: 500px;
}

.gamemain {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
}

.section.active {
	display: block;
}

.header {
	text-align: center;
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 3px solid #8a6d3b;
	position: relative;
}

.header h1 {
	font-size: 2.8rem;
	color: #5d4037;
	text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
	letter-spacing: 5px;
}

.header h2 {
	font-size: 1.5rem;
	color: #795548;
	margin-top: 5px;
	font-weight: normal;
}

/* 主菜单样式 */
.main-menu {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 25px;
	padding: 30px 0;
}

.input-group {
	width: 80%;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.input-group label {
	font-size: 1.2rem;
	font-weight: bold;
	color: #5d4037;
}

.input-group input {
	padding: 12px 15px;
	border: 2px solid #8a6d3b;
	border-radius: 4px;
	background: #f9f5e7;
	font-size: 1.1rem;
	color: #4a3c2e;
}

.btn {
	padding: 12px 30px;
	background: #8a6d3b;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1.2rem;
	cursor: pointer;
	transition: all 0.3s;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	margin-top: 10px;
}

.btn:hover {
	background: #6b4f29;
	transform: translateY(-2px);
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* 房间选择样式 */
.departments {
	display: grid;
	grid-template-columns: repeat(3, 1fr);

	gap: 15px;
	padding: 20px;
	border-bottom: #bb9a62 solid 2px;
}

.department {
	border: 2px solid #8a6d3b;
	border-radius: 5px;
	padding: 15px;
	background: #f9f5e7;
	cursor: pointer;
	transition: all 0.3s;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.department:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.department.selected {
	background: #e8dfca;
	border-color: #5d4037;
	box-shadow: inset 0 0 0 2px #5d4037;
}

.department.occupied {
	opacity: 0.7;
	cursor: not-allowed;
}

.department.ai {
	background: #e8f5e9;
}

.department h3 {
	font-size: 1.4rem;
	margin-bottom: 10px;
	color: #5d4037;
}

.department .status {
	font-size: 1.1rem;
	color: #795548;
}

/* 游戏界面样式 */
.game-container {
	display: grid;
	grid-template-columns:0.15fr 0.6fr 0.25fr;
	gap: 20px;
	margin-top: 20px;
	
}
.game-desktop{
	border: 2px solid #8a6d3b;
	border-radius: 5px;
	padding: 5px;
}

.global-data {
	background: #f9f5e7;
	border: 2px solid #8a6d3b;
	border-radius: 5px;
	padding: 10px;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
}

.dept-progress {
	/*border-bottom: 1px dashed #8a6d3b;*/
	border: 2px solid #8a6d3b;
	border-radius: 5px;
	padding: 3px;
	margin: 0 3px;
	background: #f9f5e7;
	cursor: pointer;
	transition: all 0.3s;
	text-align: center;
	overflow: hidden;
	height: 100px;
}

.dept-name {
	font-weight: bold;
	display: flex;
	justify-content: space-between;
	margin-bottom: 5px;
	color: #5d4037;
}

progress {
	width: 100%;
	height: 25px;
	border-radius: 3px;
	border: 1px solid #8a6d3b;
	overflow: hidden;
}

progress::-webkit-progress-bar {
	background-color: #e8dfca;
}

progress::-webkit-progress-value {
	background-color: #8a6d3b;
}

.local-data {
	background: #f9f5e7;
	border: 2px solid #8a6d3b;
	border-radius: 5px;
	padding: 15px;
}

.local-data div {
	font-size: 1rem;
	font-weight: bold;
	color: #5d4037;
	text-align: center;
	margin-bottom: 5px;
}

.event-log {
	background: #f9f5e7;
	border: 2px solid #8a6d3b;
	border-radius: 5px;
	padding: 15px;
	overflow-y: auto;
	height: 250px;
}

.event-log h3 {
	color: #5d4037;
	margin-bottom: 10px;
	text-align: center;
}

.event-entry {
	padding: 5px;
	border-bottom: 1px dashed #8a6d3b;
	font-size: 0.95rem;
}

.hand-container {
	margin-top: 20px;
	background: #f9f5e7;
	border: 2px solid #8a6d3b;
	border-radius: 5px;
	padding: 0px 15px 15px 15px;
}

.hand-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: relative;
	z-index: 50;
	background-color: #f9f5e7;
	padding-top: 15px;
}

.hand-header div {
	margin-right: 3%;
}

.hand-cardslls {
	overflow-x: auto;
	margin-top: -35px;
}

.hand-cards {
	display: flex;
	width: 100%;
	padding-top: 35px;
	padding-right: 100px;
	height: 280px;
	/*gap: 15px;*/
	flex-wrap: wrap;
}

.card {
	width: 180px;
	height: 240px;
	position: relative;
	transition: transform 0.3s ease;
}
.dept-selected{
	border: 2px solid #ffffff;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
	
}
.dept-selected:hover{
	border: 2px solid #f9f5e7;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
	
}
.disabled .cardss {
	background-color: rgb(228, 228, 228) !important;
	/* 灰色背景 */
	cursor: not-allowed;

	transition: all 0.2s;
	transform: none !important;
	box-shadow: none !important;
}

.prepare {
	transform: translateY(-10px);
	transition: all 0.1s;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
	z-index: 99;
}
.cardss {
	width: 179px;
	margin-left: 1px;
	height: 240px;
	background: rgb(255, 255, 255);
	border: 2px solid #8a6d3b;
	border-radius: 8px;
	/*padding: 10px;*/
	display: block;
	flex-direction: column;
	justify-content: space-between;
	cursor: pointer;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	position: relative;
	overflow: hidden;
	pointer-events: none;
	background-size: cover;
}
.card:hover .cardss {
	border: 2px solid #a7854c;
	box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
	background-size: 200px;
}

.card-title {
	font-weight: bold;
	color: #5d4037;
	font-size: 1.1rem;
	/*border-bottom: 1px solid #e0d6c3;*/
	padding: 35px 7px;
	writing-mode: vertical-lr;
	float: left;
	height: 215px;
	width: 35px;
	/*border: 2px solid #8a6d3b;*/
	/* style="background-image: url(${noneimg});"*/
	background: rgb(255, 255, 255, 0.3);
}

.card-desc {
	font-size: 0.9rem;
	flex-grow: 1;
	padding: 5px;
	color: #795548;

	/*border: 2px solid #8a6d3b;*/
	background: rgb(255, 255, 255, 0.3);
	position: absolute;
	bottom: 21px;
	right: 0px;
	width: 140px;
	font-weight: bold;
}

.card-effect {
	font-size: 0.9rem;
	font-weight: bold;
	color: #795548;
	text-align: center;
	margin-top: 5px;
	position: absolute;
	bottom: 0px;
	left: auto;
	background: rgb(255, 255, 255, 0.4);
	width: 100%;
	height: 20px;
	font-weight: bold;
}

.card-cost {
	position: absolute;
	top: 5px;
	left: 5px;
	background: #8a6d3b;
	color: white;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 0.8rem;
}

.dept-icon {
	font-size: 2rem;
	margin-bottom: 10px;
}

.server-msg {
	text-align: center;
	margin-top: 15px;
	color: #d32f2f;
	font-weight: bold;
}

.gameplayer {
	font-weight: bold;
	display: grid;

	padding: 20px;
}

.gameplayer div {
	/*border-bottom: #8a6d3b solid 2px;*/
	padding: 3px;
	margin: 3px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gameconfig {
	display: block;
	padding: 20px;
	border-bottom: #bb9a62 solid 2px;
}

.gameconfig div {
	/*border-bottom: #bb9a62 solid 2px;*/
	padding: 5px;
	margin: 5px;
	font-size: large;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gameuiplay {
	text-align: center;
}

.connection-status {
	position: fixed;
	top: 20px;
	right: 20px;
	background: #4caf50;
	color: white;
	padding: 8px 15px;
	border-radius: 20px;
	font-size: 0.9rem;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	z-index: 100;
}

.connection-status.offline {
	background: #f44336;
}

.single-player-option {
	text-align: center;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #8a6d3b;
}

.endbuton {
	position: absolute;
	z-index: 99;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.game-container {
		grid-template-columns: 0.3fr 0.2fr 0.4fr;
	}

	.departments {
		grid-template-columns: repeat(3, 1fr);
	}

	.header h1 {
		font-size: 2.2rem;
	}
}

@media (max-width: 480px) {
	.departments {
		grid-template-columns: repeat(3, 1fr);
	}

	.header h1 {
		font-size: 1.8rem;
	}
}